/**
 * desc:商品详情页api
 * @Author: wenjunjay
 * @Date: 2025/01/18 20:11:43
 * @LastEditors: wenjunjay
 */
import request from "@/utils/request";

export const getDetailApi = (id) => {
  return request({
    url: '/goods',
    params: {
      id
    }
  })
}

/**
 * 获取热榜商品
 * @param {Number} id - 商品id
 * @param {Number} type - 1代表24小时热销榜 2代表周热销榜
 * @param {Number} limit - 获取个数
 */
export const fetchHotGoodsAPI = (id,type,limit) => {
    return request({
      url:'/goods/hot',
      params:{
        id, 
        type, 
        limit
      }
    })
  }